<!DOCTYPE html>
<html>

<head>
    <meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="full-screen" content="true" />
    <meta name="screen-orientation" content="portrait" />
    <meta name="x5-fullscreen" content="true" />
    <meta name="360-fullscreen" content="true" />
    <title>燃情世界杯</title>
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/index.css">
    <script src="js/jquery-1.11.3.min.js"></script>
    <!--[if lt IE 9]>
    <script src="js/html5shiv.min.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->
</head>

<body>
<div class="bg">
    <div class="loding">
        <img src="images/index/lodings.jpg" alt="">
    </div>
    <video  id="video"  preload="auto" playsinline x-webkit-airplay="true" webkit-playsinline x5-video-player-type="h5" x5-video-player-fullscreen="true" width="100%" src="https://cdn.ymhudong.com/h5/pepsi/resource/assets/video_ios_1.mp4" x5-video-orientation="portraint">
        您的浏览器不支持 video 标签。
    </video>
    <div class="btn" id='btn' onclick="bofang()">
        点击开始
    </div>
</div>
<!--弹出框-->
<div class="tailoring-container project">
    <div class="tailoring-contents">
            <div class="sex">
                <div class="sex_img">
                    <img src="images/index/nan.png" alt=""/>
                    <a href="upload.html"> 我是男生 </a>
                </div>
                <div class="sex_img sexs">
                    <img src="images/index/nv.png" alt=""/>
                    <a href="upload.html"> 我是女生 </a>
                </div>
            </div>
    </div>
</div>
</body>
<script src="js/index.js"></script>
<script type="text/javascript">

//
        $(window).on('load', function(){
            $('.loding').hide(0);
           
          });
//    视频播放

     var video = document.getElementById("video");
       video.play();
   	//判断是否在ios或者安卓打开
	var u = navigator.userAgent;
	var isIos = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); 
	var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1;
	if(isIos){
		//执行逻辑
		// document.getElementById('closeBtn').style.display = 'block';
		// enterVideo.src = 'https://cdn.ymhudong.com/h5/pepsi/resource/assets/video_ios_1.mp4';
		// enterVideo.load();
	}else if(isAndroid){
		//执行逻辑
		document.getElementById('closeBtn').style.display = 'block';
		enterVideo.src = 'https://cdn.ymhudong.com/h5/pepsi/resource/assets/video_ios_1.mp4';
		document.getElementById('playBtn').style.display = 'block';
	}
    // function bofang(){
    //     video.play();
    // }
    //   播放完成
    $("#video").get(0).addEventListener("ended",function(){
        $('.project').show();
    },false);
</script>

</html>
